import { Caller } from "../../../../com/gengine/core/call/Caller";
import { MessageBlock } from "../../../../Framework/MQ/MessageBlock";
import { BroadCastCall } from "./BroadCastCall";
//class BroadCastManager
    
    export  class BroadCastManager
    {
        constructor()
        {
            
            this._caller = new Caller();
            return;
        }

        public call(arg1: Object, arg2: MessageBlock): void
        {
            this._caller.call(arg1, arg2);
            return;
        }

        public registerCall(arg1: BroadCastCall): void
        {
            this._caller.addCall(arg1.type, arg1.call);
            return;
        }

        public removeCall(arg1: BroadCastCall): void
        {
            this._caller.removeCall(arg1.type, arg1.call);
            return;
        }

        public static get instance(): BroadCastManager
        {
            if (BroadCastManager._instance == null) 
            {
                BroadCastManager._instance = new BroadCastManager();
            }
            return BroadCastManager._instance;
        }

        private /* var */_caller: Caller;

        private static /* var */_instance: BroadCastManager;
    }
